Using layout.root here should be sufficient
authorPaul Woolcock <paul@woolcock.us>
Mon, 5 Dec 2016 14:41:03 +0000 (09:41 -0500)
committerPaul Woolcock <paul@woolcock.us>
Mon, 5 Dec 2016 14:41:03 +0000 (09:41 -0500)
src/cargo/util/toml.rs

index 1d4f8608ad08b0a9063471b50e82435632516d29..fd5a36ca1f9b10eb3eea43c579815e0f9fd8023e 100644 (file)
@@ -546,11 +546,7 @@ impl TomlManifest {
         }
 
         // processing the custom build script
-        let manifest_file = util::important_paths::find_root_manifest_for_wd(None, &layout.root)
-                                 .chain_error(|| human("Could not find root manifest location"))?;
-        let base_dir = manifest_file.parent()
-                                    .ok_or(human("Could not get parent directory of manifest"))?;
-        let new_build = self.maybe_custom_build(&project.build, &base_dir);
+        let new_build = self.maybe_custom_build(&project.build, &layout.root);
 
         // Get targets
         let targets = normalize(&lib,